﻿@model Telecom.Data.QUAN_HUYEN

@{  AjaxOptions ajaxOpts = new AjaxOptions
    {
        HttpMethod = "post",
        OnComplete = "completedAjaxRequestwindow"
    };
}

<script type="text/javascript">

    function opBeginProcess_loading_window_submit() {
        $("#ContentwindowFunction").mask("Dữ liệu đang xử lý");
    }

    function completedAjaxRequestwindow(obj) {

        var returnObj = eval('(' + obj.responseText + ')');

        if (returnObj.Status == "success") {

            $("#page_quan_huyen_TableContainer").jtable('reload')

            close_window_elements('window_addupdate_quanhuyen_page');


        } else {

            $("#ContentwindowFunction").unmask();
            confirmOptionNormal(returnObj.Message);
        }

        return false;

    }

     
</script>

@using (Ajax.BeginForm("AddQuanHuyen", "QuanHuyen", null, ajaxOpts, new { enctype = "multipart/form-data" }))
{
    <div id="ContentwindowFunction" class="ContentwindowFunction">
       <table class="tableContentWindowFunction">
           <tr>
                <td>
                   Mã Quận Huyện
                </td>
               <td>
                    @Html.HiddenFor(model => model.MA_TINH)
                    @Html.TextBoxFor(model => model.MA_QUAN, new { @class = "input_table_function maTable"})
               </td>
           </tr>
           <tr>
                <td>
                    Tên
                </td>
               <td>
                   @Html.TextBoxFor(model => model.TEN_QUAN, new { @class = "input_table_function"})
               </td>
           </tr>
           <tr>
                <td>
                    Lat
                </td>
               <td>
                   @Html.TextBoxFor(model => model.CLAT, new { @class = "input_table_function"})
               </td>
           </tr>
           <tr>
                <td>
                    Long
                </td>
               <td>
                   @Html.TextBoxFor(model => model.CLONG, new { @class = "input_table_function"})
               </td>
           </tr>
           <tr>
                <td>Ghi chú
                </td>
                <td>
                    @Html.TextAreaFor(model => model.GHICHU, new { @class = "input_table_function" })
                </td>
            </tr>
       </table>
        <div style="height:0px"></div>
        <div class="footer_submit" style="margin-top: 10px; text-align: center">
            <button type="submit" onclick="return opBeginProcess_loading_window_submit(); ">
                <span class="l-btn-left l-btn-icon-left"><span class="l-btn-text">Cập nhật quận huyện</span><span class="l-btn-icon icon-add">&nbsp;</span></span>    
            </button>
            <button type="button" onclick="return close_window_elements('window_addupdate_quanhuyen_page');" >
                <span class="l-btn-left l-btn-icon-left"><span class="l-btn-text">Hủy bỏ</span><span class="l-btn-icon icon-remove">&nbsp;</span></span></button>
        </div>
    </div>
    

}